package com.efivestar.idm.api.service.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

@Builder
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class EventDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    private Long id;

    private String deviceId;

    /**
     * 事件类型.
     */
    private int eventType;

    /**
     * 子事件类型.
     */
    private int subEventType;

    /**
     * 具体事件内容.
     */
    private int content;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",  timezone = "GMT+8")
    private Date endTime;


}
